<svg xmlns="http://www.w3.org/2000/svg" onload="tweak()">
    <pattern>
        <rect id="r" />
    </pattern>
    <script>
      function tweak() {
        document.getElementById("r").style.textDecoration = "underline";
      }
    </script>
</svg>
